home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / Pascal / OneTest / Main.p next >
Text File  |  1994-10-29  |  861b  |  38 lines

  1. {Main program for OneTest. See OneEvents.p for comments. This unit initializes OneEvents and everything else,}
  2. {and calls the event handler until we finish. A real program should probably call your own separate init procedures.}
  3.  
  4. program OneTest;
  5.     uses
  6. {$ifc undefined THINK_PASCAL}
  7.         Types, QuickDraw, Events, Windows, Dialogs, Fonts, DiskInit, TextEdit, Traps, Desk, Memory,{}
  8.         SegLoad, Scrap, ToolUtils, OSEvents, OSUtils, Menus, Resources, StandardFile, GestaltEqu, Files,{}
  9.         Errors, {}
  10. {$endc}
  11.         OneEvents, StdHandlerStubs;
  12.  
  13.     var
  14.         m: MenuHandle;
  15.         w: WindowPtr;
  16.  
  17. begin
  18. {Init OneEvents}
  19.  
  20.     OneInit('About OneTest…');
  21.  
  22. {Init my own stuff}
  23.  
  24.     m := GetMenu(128);
  25.     InsertMenu(m, 0);
  26.     DrawMenuBar;
  27.     if gHasCQD then
  28.         w := GetNewCWindow(128, nil, WindowPtr(-1))
  29.     else
  30.         w := GetNewWindow(128, nil, WindowPtr(-1));
  31.  
  32. {Run}
  33.  
  34.     repeat
  35.         PollEvents
  36.     until gDone;
  37.  
  38. end.